import java.io.IOException;
import java.io.UnsupportedEncodingException;

import org.jibble.pircbot.*;

public class MyBotMain {

	/**
	 * 
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {

		int i = 0;

		try {
			conectBot(i);
		} catch (Exception e) {
			System.out.println(e);
			i++;

		}

	}

	/***
	 * 
	 * @param count
	 * @throws UnsupportedEncodingException
	 * @throws IOException
	 * @throws IrcException
	 * @throws NickAlreadyInUseException
	 */
	private static void conectBot(int count) throws UnsupportedEncodingException, IOException, IrcException, NickAlreadyInUseException {
		// Now start our bot up.
		MyBot bot = new MyBot();

		// Enable debugging output.
		bot.setVerbose(true);
		bot.setAutoNickChange(true);

		// 文字コード
		bot.setEncoding("ISO2022JP");

		// Connect to the IRC server.
		bot.connect("irc.friend-chat.jp");

		// Join channel.
		bot.joinChannel("#kai_j");
		bot.joinChannel("#kai_vip");
		bot.joinChannel("#kai_test");

	}

}
